﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:conv="clr-namespace:SuperFind.Converters"
	mc:Ignorable="d"
	>
	<BitmapImage x:Key="ApplicationIcon" CreateOptions="IgnoreImageCache" CacheOption="OnLoad" UriSource="pack://siteoforigin:,,,/images/Application.ico"/>
	<!-- Resource dictionary entries should be defined here. -->
	<DataTemplate x:Key="dtSearchResult">
		<Grid MinHeight="30">
            <Image x:Name="imgIcon" Width="24" Height="24" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="8,0,0,0" >
        	    <Image.Source>
			    <MultiBinding Converter="{conv:FileIconConverter}">
				    <Binding Path="FilePath"/>
				    <Binding Path="FileType"/>
			    </MultiBinding>
		    </Image.Source>
		    </Image>
            <TextBlock x:Name="txtFileName" TextWrapping="Wrap" Text="{Binding FileName}" HorizontalAlignment="Left" TextTrimming="CharacterEllipsis" Margin="36,8.723,0,8" d:LayoutOverrides="Height" />
            <TextBlock x:Name="txtFilePath" TextWrapping="Wrap" Text="{Binding FilePath}" VerticalAlignment="Bottom" HorizontalAlignment="Left" FontSize="8" Foreground="Gray" TextTrimming="CharacterEllipsis" Margin="41,0,0,0"/>
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}},Path=IsSelected}" Value="True">
                <Setter TargetName="txtFileName" Property="Foreground" Value="White"/>
                <Setter TargetName="txtFilePath" Property="Foreground" Value="White"/>
            </DataTrigger>
        </DataTemplate.Triggers>
        </DataTemplate>
</ResourceDictionary>
